import pandas as pd


# 加载数据
def load_dataframe(xlsfile, sheetname):
    dataframe = pd.read_excel(xlsfile, sheet_name=sheetname)
    print('-----------原始数据-----------')
    print(dataframe)
    print('-----------数据尺寸-----------')
    print(dataframe.shape)

    dataframe.drop(columns="时间", axis=1, inplace=True)
    dataframe.set_index([[2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019]],
                        inplace=True)
    return dataframe
